import {defineConfig} from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import {resolve} from 'path'

export default defineConfig({
    plugins: [uni()],
    server: {
        disableHostCheck: true,
        port: 8081,
        proxy: {
            "^/api": {
                "target": "http://localhost:19999",
                "changeOrigin": true,
                rewrite: (path) => path.replace(/^\/api/, ''),
            },
            "^/ws": {
                "target": "https://apis.map.qq.com",
                "changeOrigin": true,
            }
        }
    }
});